<template>
    <div class="infor">
        <!-- 顶部导航栏 --> 
        <van-nav-bar :title="`${commName}老年大学报名表`" left-arrow @click-left="$router.go(-1)"/>
        <div class="form">
        <!-- <form action=""> -->
            <!-- 姓 名 -->
            <div class='enroll-item'>
                <div class='item-title'>姓 名</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content'>{{messObj.olderName}}</div>
            </div>
            <!-- 姓 别 -->
            <div class='enroll-item'>
                <div class='item-title'>生 日</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content'>{{messObj.olderBirth}}</div>
            </div>
            <!-- 出生年月 -->
            <div class='enroll-item'>
                <div class='item-title'>性 别</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content'>{{messObj.olderSex}}</div>
            </div>
            <!-- 移动电话 -->
            <div class='enroll-item'>
                <div class='item-title'>移动电话</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content'>{{messObj.olderPhone}}</div>
            </div>
            <!-- 居住地址 -->
            <div class='enroll-item'>
                <div class='item-title'>居住地址</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content address'>{{messObj.olderAddress}}</div>
            </div>
            <!-- 报名课程 -->
            <div class='enroll-item phon'>
                <div class='item-title'>报名课程</div>
                <!-- <div class='item-xing'>*</div> -->
                <div class='item-content'>{{messObj.olderCourse}}</div>
            </div>
            <!-- 提交反馈 -->
            <div class="feedback">
                <div class='feed-input'>{{messObj.remarks}}</div>
            </div>
        </div>
  </div>
</template>
<script>
import apiHttp from '../../../../api/index'
export default {
    data(){
        return{
            olderId:this.$route.query.id ? this.$route.query.id : '',
            commName:this.$route.query.name ? this.$route.query.name : '',
            userId:sessionStorage.getItem('userId'),
            messObj:{}
        }
    },
    mounted(){
        this.getMyOlderById()
    },
    methods:{
        getMyOlderById(){
            let parmes = {
                olderId:this.olderId,
                userId:this.userId
            }
            apiHttp.comIndex.getMyOlderById(parmes,resp=>{
                if(resp.resultCode == '000000'){
                    this.messObj = resp.data.older
                    if(this.messObj.olderSex == 1){
                        this.messObj.olderSex = '男'
                    }else{
                        this.messObj.olderSex = '女'
                    }
                }
            })
        }
    }
}
</script>
 <style scoped>
.form{
    width: 92%;
    margin: 0 auto;
    background-color:#fff;
    font-size: 0.7rem;
    margin-top: 0.4rem;
}
.enroll-item {
    display: flex;
    flex-direction: row;
    padding: 0 0.5rem;
    min-height: 2rem;
    flex-wrap: nowrap;
    align-items: center;
    width: 92%;
    margin: 0 auto;
    border-bottom: 1px solid #D8D8D8;
}
.phon{
    border-bottom: 0px;
}
.item-title {
    font-size: 30rpx;
    color: #000000;
    white-space: nowrap;
}

.item-xing {
    color: #fc6262;
    margin-top: 0.3rem;
}

.item-content {
    background: transparent;
    color: #000;
    flex: 1;
    text-align: right;
}
input{
    border:none;
}
.inforBtn{
    bottom: 1rem;
    position: fixed;
    border: none;
    width: 90%;
    line-height: 1.8rem;
    border-radius: 6px;
    background-color: #D33043;
    color: #FFFFFF;
    font-size: 0.8rem;
}
.feed-input{
    width:100%;
    background-color:#ffffff;
    font-size: 0.7rem;
    color:#000;
    padding: 0.3rem;
    height: 5rem;
    border-radius:4px;
    border:none;
    
}
.feedback{
    border-top: 5px solid #F5F5F5;
}
.address{
    line-height: 1.2rem;
}
 </style>


